package com.briup.MR.Sort.SecondSort;


import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;
//分组
public class YearTempGroup
        extends WritableComparator {
    public YearTempGroup(){
        super(YearTemp.class,true);
    }

    @Override
    public int compare(WritableComparable a, WritableComparable b) {
        YearTemp t= (YearTemp) a;
        YearTemp t1= (YearTemp) b;
        return t.getYear().compareTo(t1.getYear());
    }
}
